import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter)

import Home from '@/views/Home'
import Search from '@/views/Search'
import Layout from '@/views/Layout'
import Play from '@/views/Play'

const router = new VueRouter({
    routes: [
        { path: '/', redirect: '/layout/home', },
        {
            path: '/layout',
            component: Layout,
            children: [
                { path: 'home', meta: { title: '首页' }, component: Home },
                { path: 'search', meta: { title: '搜索' }, component: Search }
            ]
        },
        { path: '/play', component: Play }
    ]
})

export default router